<!DOCTYPE html>
<!-- saved from url=(0064)https://www.hua.com/Passport/Login/LoginBind?appAuthorizedType=2 -->
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title>LoginBind</title>
    <meta name="description">
    <meta name="keywords">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit|ie-comp">
    <!--css-->
    <link rel="icon" href="https://www.hua.com/favicon.ico" mce_href="/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="../css/layer.css">
    <link rel="stylesheet" href="../css/common.css" type="text/css"/>
    <link rel="stylesheet" href="../css/public_2020.css">
    <link rel="stylesheet" href="../css/mbar.css">
    <link rel="stylesheet" href="../css/pc_login_20191023.css">
    <!--公共js-->
    <script src="../../../Common/js/jquery-3.5.1.min.js"></script>
    <script src="../../../Common/layui/layui.js"></script>
    <script src="../../../Common/js/jquery.form.js"></script>
    <script src="../../../Common/js/common.js"></script>

    <!--js-->
    <script src="../js/common.js"></script>
    <script src="../js/analytics.js"></script>
    <!--<script src="../js/meiqia.js"></script>-->
    <script src="../js/gtm.js"></script>
    <!--<script src="../js/CheckAgent"></script>-->

    <script type="text/javascript" src="../js/statesandright.js"></script>
    <script type="text/javascript" src="../js/mailautocomplete.js"></script>
    <script type="text/javascript" src="../js/gt.js"></script>
    <script type="text/javascript" src="../js/verifyMethodSwitch.js"></script>
    <script type="text/javascript" src="../js/pc_Login_CommonV2.js"></script>
    <script type="text/javascript" src="../js/loginbind.js"></script>
    <!--[if lte IE 9]>
    <style>
        .pwd-input {
            display: none;
        }
    </style>
    <![endif]-->
    <style>
        body {
            color: #737373;
        }
    </style>

    <!--[if lt IE 9]>
    <script src="//img02.hua.com/pc/assets/js/html5shiv.min.js"></script>
    <![endif]-->
</head>
<body class="home">

<!-- 顶部导航 -->
<div class="site-nav">
    <div class="container">

        <ul class="site-nav-l">
            <li class="menu">
                <a href="https://www.hua.com/" onclick="addfavorite();return false;"><span class="ico ico-star"></span>收藏鲜花网(hua.com)</a>
            </li>
            <li class="menu dropdown">
                <a href="javascript:void(0)" data-hover="dropdown" data-delay="0"><span class="ico ico-weixin"></span>关注微信</a>
                <div class="dropdown-menu dropdown-weixin">
                    <img src="../images/wxguanjia_qrcode.png" height="124" width="124">
                    <p>扫码关注<br>回复"礼物" 更多惊喜！</p>
                </div>
            </li>
            <li class="menu dropdown">
                <a href="https://www.hua.com/mobile/" data-hover="dropdown" data-delay="0" target="_blank"><span
                        class="ico ico-mobile"></span>花礼网app</a>
                <div class="dropdown-menu dropdown-weixin">
                    <img src="../images/app_download_qrcode.png" height="124" width="124">
                    <p>新人专享100元APP礼包</p>
                </div>
            </li>
        </ul>
        <ul class="site-nav-r">
            <!--登陆状态信息显示start-->
            <li class="menu login" id="LoginInfo"><a
                    href="https://www.hua.com/Passport/Login/?backUrl=https://www.hua.com/Passport/Login/LoginBind?appAuthorizedType=2"
                    rel="nofollow">你好，请登录</a><a href="https://www.hua.com/Passport/Register/" rel="nofollow">注册</a></li>
            <!--登陆状态信息显示end-->
            <li class="site-nav-pipe">|</li>
            <li class="menu">
                <a href="https://www.hua.com/help/ordercx/" rel="nofollow" target="_blank">订单查询</a>
            </li>
            <li class="site-nav-pipe">|</li>
            <!--我的花礼信息显示start-->
            <li class="menu dropdown">
                <a href="https://www.hua.com/member/" rel="nofollow" data-hover="dropdown" data-delay="0"
                   target="_blank" aria-expanded="false">我的花礼</a>
            </li><!--我的花礼信息显示end-->
            <li class="site-nav-pipe">|</li>
            <li class="menu dropdown">
                <a href="https://www.hua.com/help/" data-hover="dropdown" data-delay="0" target="_blank"
                   aria-expanded="false">客户服务<span class="glyphicon glyphicon-triangle-bottom"></span></a>
                <div class="dropdown-menu dropdown-service">
                    <a href="https://www.hua.com/member/payment/balancefill" target="_blank">在线付款</a>
                    <a href="https://www.hua.com/help/" target="_blank">帮助中心</a>
                    <a href="https://www.hua.com/help/afterservice.htm" target="_blank">售后服务</a>
                    <a href="https://www.hua.com/help/sendRange.htm" target="_blank">配送范围</a>
                    <a href="https://www.hua.com/chat/" target="_blank">留言反馈</a>
                </div>
            </li>
            <li class="site-nav-pipe">|</li>
            <!--购物车信息显示start-->
            <li class="menu dropdown">
                <a href="https://www.hua.com/shopping/showcart/" data-hover="dropdown" data-delay="0" rel="nofollow"
                   target="_blank" aria-expanded="false"><span class="ico ico-cart"></span>购物车<span class="text-primary"
                                                                                                    id="gwcCount">(0)</span><span
                        class="glyphicon glyphicon-triangle-bottom"></span></a>
                <div class="dropdown-menu dropdown-cart" id="CartInfo">
                    <div class="empty">您的购物车中没有商品，<a href="https://www.hua.com/">先去选购吧</a>！</div>
                </div>
            </li><!--购物车信息显示end-->
            <li class="site-nav-pipe">|</li>
            <li class="menu slogan">
                中国鲜花礼品网:中国鲜花网领先品牌
            </li>
        </ul>
    </div>
</div>
<!-- 顶部导航 End -->
<!-- 头部 -->
<header>
    <div class="logo">
        <h1><a href="https://www.hua.com/" class="logo-bd">中国鲜花礼品网(花礼网)</a></h1>
        <!---->
    </div>
    <div class="search">
        <form name="i_search" method="get" action="https://www.hua.com/search/">
            <div class="input-group">
                <input name="keyword" type="text" class="form-control" placeholder="商品关键词">
                <span class="input-group-btn">
                            <button id="test" class="btn btn-primary" type="button"
                                    onclick="this.form.submit()">搜索</button>
                        </span>
            </div>
        </form>

    </div>
    <div class="service serviceDefault">
        <span class="ico ico-phone"></span>400-889-8188
        <a id="header-chat" href="javascript:void(0);"><span class="ico ico-headset"></span>在线客服</a>
    </div>
    <div class="service serviceVip">
        <div class="vipwechatchat">
            <img style="margin-right: 6px;" src="../images/wechat.png" width="30"><span>1对1钻石客户经理</span>
            <div class="vipwechatchat-box">
                <h3>微信1对1客服经理</h3>
                <img class="img-responsive" style="width: 120px;display: inline-block;"
                     src="../images/VIPChatQR.jpg">
                <p>扫一扫添加客户经理微信</p>
                <p>微信号：VIP-Service-Hua</p>
            </div>
        </div>
        <a id="header-chat" href="javascript:void(0);"><span class="ico ico-headset"></span>在线客服</a><br>
        <span class="ico ico-phone"></span><span>钻石专线：400-830-3920</span>
    </div>
</header>
<!-- 头部 End -->


<section class="login-wrapper">
    <div class="container">
        <div class="login-box">
            <ul class="login-tabs">
                <li class="bind-byphone active" style="margin-left: 100px;">绑定手机</li>
            </ul>
            <div id="form1">
                <!-- 绑定手机 -->
                <div class="login-form login-form-box" style="display:block;">
                    <div class="login-form-phone" style="display:block;margin-top: 20px;">
                        <div class="tel-box">
                            <div class="input-box">
                                <span class="icon icon-iphone"></span>
                                <input id="UserPhone" class="account" type="text" placeholder="请输入手机号">
                            </div>
                            <p class="tips"></p>
                        </div>
                        <div class="code-box">
                            <div class="input-box">
                                <span class="icon icon-message"></span>
                                <input id="phoneCode" class="pwd" type="text" placeholder="请输入短信验证码" autocomplete="off">
                                <button id="getcodeBtn" class="get-code" href="#">获取验证码</button>
                                <div id="prompt_info" style="display:none;"><span id="regetcode">90</span>秒后重新发送</div>
                            </div>
                            <p class="tips"></p>
                        </div>
                        <input class="form-btn login-btn" type="button" id="login_bd" value="绑定并登录">
                        <p class="form-tip"><i class="mini-icon icon-info"></i>为了您的账号安全，第三方登录需要绑定账号<br>一次绑定即可快速登录</p>
                    </div>
                </div>
                <div class="bottom-box">
                    <ul class="other-login-ways">
                        <li class="extra-l">
                            <a href="../html/Signin.html">
                                <i class="icon icon-arrow-left"></i>
                                返回注册登录
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</section>


<!-- 尾部导航 -->
<div class="footer-nav">
    <a href="https://www.hua.com/">首页</a> <b>|</b> <a href="https://www.hua.com/profile/about.htm"
                                                      target="_blank">关于我们</a> <b>|</b> <a
        href="https://www.hua.com/profile/media.html" target="_blank">媒体报道</a> <b>|</b> <a
        href="https://www.hua.com/profile/contact.htm" target="_blank">联系方式</a> <b>|</b> <a
        href="https://www.hua.com/qiyetuangou/" target="_blank">企业团购</a> <b>|</b><a href="https://www.hua.com/liansuo/"
                                                                                    target="_blank">花店入驻</a><b>|</b> <a
        href="https://www.hua.com/profile/links.htm" target="_blank">友情链接</a> <b>|</b> <a
        href="https://www.hua.com/member/payment/balancefill" target="_blank">在线补款</a> <b>|</b> <a class="last-child"
                                                                                                   href="https://www.hua.com/profile/why_choose_us.htm"
                                                                                                   target="_blank">为什么选择中国鲜花礼品网</a>
</div>
<!-- 尾部导航 End -->
<!-- 通用尾部 -->
<footer>
    <div class="auth">
        <!-- <span style="margin-right:8px;">
            <script src="http://kxlogo.knet.cn/seallogo.dll?sn=e15041744030058395oqbo000000&amp;size=4"></script>
        </span> -->


        <img src="../images/slogan.png" height="50" width="212">
        <a href="https://www.hua.com/profile/about.htm" target="_blank">
            <img src="../images/100.jpg" height="49" width="150">
        </a>
        <a href="https://www.hua.com/profile/ICP.htm" rel="nofollow" target="_blank">
            <img src="../images/bico1.jpg" alt="ICP" height="46" width="35">
        </a>
        <a href="https://szcert.ebs.org.cn/55f867a5-2c2e-4bc0-823b-5f4647c23d86">
            <img src="../images/govIcon.gif" style="width: 40px;height: 40px">
        </a>
    </div>
    <p>
        <a href="https://www.hua.com/profile/ChinaFlowerAssociation.htm" rel="nofollow" target="_blank" title="中国花卉协会会员">中国花卉协会会员</a>
        <a href="https://www.hua.com/profile/chinaECA.htm" rel="nofollow" target="_blank">中国电子商务协会会员</a>
        ICP经营许可证：
        <a>粤B2-20050744</a>
        <b>|</b>
        <a href="http://beian.miit.gov.cn/" rel="nofollow" target="_blank">粤ICP备09171662号</a>
        <span class="ico beian"></span>粤公网安备44030502000373号 Copyright © 2005-2020</p>
    <p><a href="https://www.hua.com/">www.hua.com</a><span> 深圳市百易信息技术有限公司</span></p>
</footer>
<!-- 通用尾部 End -->
<!-- 弹出窗口-->

<!-- 弹出窗口end-->
<div class="mui-mbar-tabs">

    <div class="quick_links_wrap">
        <div class="quick_link_mian">
            <div class="quick_links_panel">
                <div id="quick_links" class="quick_links">
                    <li>
                        <a href="https://www.hua.com/Passport/Login/LoginBind?appAuthorizedType=2#none"
                           class="my_qlinks"><i class="ico_user"></i></a>
                        <!-- ***** 未登录 ***** -->
                        <div class="ibar_login_box" style="display: none;">
                            <div class="avatar_box" id="loginStats"><p class="avatar_imgbox"><img
                                    src="../images/avatar_none.jpg"></p>你好！请 <a
                                    href="https://www.hua.com/Passport/Login/?backUrl=https://www.hua.com/Passport/Login/LoginBind?appAuthorizedType=2">登录</a>
                                | <a href="https://www.hua.com/Passport/Register/">注册</a></div>
                            <div class="login_btnbox">
                                <a href="https://www.hua.com/Member/Order/"><i class="ico_order"></i>我的订单</a>
                            </div>
                            <i class="icon_arrow_right_white"></i>
                        </div>
                    </li>
                    <li id="shopCart">
                        <a href="javascript:void(0)" class="message_list"><i class="ico_cart"></i>
                            <div class="span">购物车</div>
                            <span class="cart_num" id="cart_num">0</span></a>
                    </li>
                    <li>
                        <a href="javascript:void(0)" class="history_list"><i class="ico_collect"></i></a>
                        <div class="mp_tooltip" style="left: -150px; visibility: hidden;">
                            <a href="javascript:void(0)" class="history_list"
                               style="color: #595656;font-size: 14px;width: 100%;background: #fff;border-radius: 3px 0 0 3px;">我的收藏</a>
                            <i class="icon_arrow_right_white"></i>
                        </div>
                    </li>
                    <li>
                        <a href="javascript:void(0)" class="mpbtn_histroy"><i class="ico_histroy"></i></a>
                        <div class="mp_tooltip" style="left: -150px; visibility: hidden;">
                            <a href="javascript:void(0)" class="mpbtn_histroy"
                               style="color: #595656;font-size: 14px;width: 100%;background: #fff;border-radius: 3px 0 0 3px;">最近查看</a>
                            <i class="icon_arrow_right_white"></i>
                        </div>
                    </li>
                    <li>
                        <a href="javascript:void(0)" class="leave_message"><i class="ico_phone"></i></a>
                        <div class="mp_tooltip" style="left: -150px; visibility: hidden;"><span id="rightbartel">400-889-8188</span><i
                                class="icon_arrow_right_white"></i></div>
                    </li>
                    <li>
                        <a id="kefu" href="javascript:;" target="_blank" class="mpbtn_recharge"><i
                                class="ico_headset"></i></a>
                        <div class="mp_tooltip" style="left: -150px; visibility: hidden;">
                            <a id="kefu1" href="javascript:;" target="_blank" class="mpbtn_recharge1"
                               style="color: #595656;font-size: 14px;width: 100%;background: #fff;border-radius: 3px 0 0 3px;"
                               title="在线客服">
                                在线客服
                            </a>
                            <i class="icon_arrow_right_white"></i>
                        </div>
                    </li>
                </div>
                <div class="quick_toggle">
                    <li>
                        <a href="javascript:void(0)"><i class="ico_qrcode"></i></a>
                        <div class="mp_qrcode">
                            <p>
                                <img src="../images/wxguanjia_qrcode.png" width="110" height="110">
                                关注微信公众号
                            </p>
                            <p>
                                <img src="../images/app_download_qrcode.png" width="110" height="110">
                                下载花礼APP
                            </p>
                            <i class="icon_arrow_right_white"></i>
                        </div>
                    </li>
                    <li>
                        <a href="https://www.hua.com/Chat/FeedBack" class="mpbtn_recharge" target="_blank"><i
                                class="ico_surveys"></i></a>
                        <div class="mp_tooltip"><a href="https://www.hua.com/Chat/FeedBack" class="mpbtn_recharge"
                                                   style="color: #595656;font-size: 14px;width: 100%;background: #fff;border-radius: 3px 0 0 3px;"
                                                   target="_blank">功能反馈</a><i class="icon_arrow_right_white"></i></div>
                    </li>
                    <li style="height:36px;margin-top:0px;">
                        <a href="https://www.hua.com/Passport/Login/LoginBind?appAuthorizedType=2#top"
                           class="return_top"><i class="ico_gotop"></i></a>
                        <div class="mp_tooltip">
                            <a href="https://www.hua.com/Passport/Login/LoginBind?appAuthorizedType=2#top"
                               class="return_top"
                               style="color: #595656;font-size: 14px;width: 100%;background: #fff;border-radius: 3px 0 0 3px;">返回顶部</a>
                            <i class="icon_arrow_right_white"></i>
                        </div>
                    </li>
                </div>
            </div>
            <div id="quick_links_pop" class="quick_links_pop hide"></div>
        </div>
    </div>
</div>
<script type="text/javascript">
    function IEVersion() {
        try {
            var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
            var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
            var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
            var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
            if (isIE) {
                var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
                reIE.test(userAgent);
                var fIEVersion = parseFloat(RegExp["$1"]);
                if (fIEVersion == 7) {
                    return 7;
                } else if (fIEVersion == 8) {
                    return 8;
                } else if (fIEVersion == 9) {
                    return 9;
                } else if (fIEVersion == 10) {
                    return 10;
                } else {
                    return 6;//IE版本<=7
                }
            } else if (isEdge) {
                return 'edge';//edge
            } else if (isIE11) {
                return 11; //IE11
            } else {
                return -1;//不是ie浏览器
            }
        } catch (e) {
            return -1;
        }
    }

    var bVersion = IEVersion();
</script>

<script type="text/javascript">
    $(function () {
        $("#login_bd").on('click',createByPhone);
        // 表单切换
        var tabs = $('.login-tabs li');  // Tab
        var tabPhone = $(".bind-byphone");   // 绑定手机
        var tabMail = $('.bind-bymail');     // 绑定邮箱

        var forms = $('.login-form');   // Form
        var formBox = $(".login-form-box");    // 绑定手机
        var formCode = $('.login-form-phone');     // 手机短信
        var formPwd = $('.login-form-pwd');    // 账号密码
        var formEmail = $('.login-form-mail');    // 绑定邮箱

        tabs.click(function () {
            tabs.removeClass("active");
            $(this).addClass("active");
            if ($(this).hasClass("bind-byphone")) {
                forms.hide();
                formBox.show();
            } else if ($(this).hasClass("bind-bymail")) {
                forms.hide();
                formEmail.show();
            }
        });
    });

    var interval = null;
    var counter = 0;

    // 短信验证码倒计时
    function intervalFunc() {
        if (counter > 90) {
            counter = 0;
            $("#getcodeBtn").show();
            $("#prompt_info").hide();
            window.clearInterval(interval);
        } else {
            $("#regetcode").html((90 - counter).toString());
        }
        counter = counter + 1;
    }

    var geetestLock = false;
    var showImgValidCode1 = false;

    // 发送手机验证码
    $("#getcodeBtn").click(function () {
        HideTips();
        if (!Check_Phone("UserPhone", ".tel-box")) return false;

        var phone = $("#UserPhone").val().trim();

        //手机号验证是否注册hm.baidu.com/hm.js
        verifyPhone(phone,function (res) {
            if (res.code == 100){
                ShowTips('手机号已绑定!','.code-box');
                //刷新图形验证码
                //RefreshImage('imgCaptcha1');
                return false;
            }
        });

        //var imgCode = Check_Code("phonePicCode", ".verify-box2");
        var data = {
            phone: phone
            //imgCode: imgCode
        };
        sendSms(data);
        /*if (!showImgValidCode1 && (imgCode == undefined || imgCode == "")) {
            verifyMethodSwitch(data, sendSms);
        } else {
            sendSms(data)
        }*/
    });

    /*function sendSms(data) {
        $.ajax({
            type: "post",
            url: "/SmsAuthenCode/SendV3",
            data: data,
            async: false,
            success: function (res) {
                var class1 = ".code-box";
                if (res.Status === "0" && res.DataStatus == 0) {
                    ShowTips("<span style='color:#232628'>验证码已发送请查收</span>", ".tel-box");
                    counter = 0;
                    $("#getcodeBtn").hide();
                    $("#regetcode").html("90");
                    $("#prompt_info").show();
                    $("#phoneCode").focus();
                    interval = window.setInterval(intervalFunc, 1000);
                } else if (res.DataStatus == 1026) {      // 需要图片验证码
                    $("#verifyBox2").show();
                    $("#phonePicCode").focus();
                    class1 = ".verify-box2";
                } else if (res.DataStatus == 1002) {     // 手机号格式不正确
                    $("#UserPhone").focus();
                    class1 = "tel-box";
                } else if (res.DataStatus == 1012) {     // 图片验证码不正确
                    $("#verifyBox2").show();
                    RefreshImage2('imgCaptcha2');
                    $("#phonePicCode").focus();
                    class1 = ".verify-box2";
                } else if (res.DataStatus == 1003) {     // 短信验证码发送过于频繁
                    class1 = ".code-box";
                }
                if (res.DataStatus != 0) {
                    ShowTips(res.ErrMsg || data.Message, class1);
                }
            }
        });
    }*/

    var AuthType = "2";

    // 绑定手机
    function createByPhone() {
        $("#login_bd").unbind('click');
        try {
            HideTips();
            if (!Check_Phone("UserPhone", ".tel-box")) return false;    // 手机
            if (!Check_SmsCode("phoneCode", ".code-box")) return false;      // 短信验证码
            var phone = $("#UserPhone").val().trim();
            var code = $("#phoneCode").val().trim();
            var data = {
                phone: phone,
                code: code,
                //第三方存在 redis 键
                _qiq: getQueryString('_qiq')
            }
            //绑定手机
            bind_Phone(data);
            /*$.ajax({
                type: "post",
                url: "/Passport/Login/ValidMobileAndCreateMember",
                data: {
                    mobile: phone,
                    smsCode: code,
                    appAuthorizedType: AuthType
                },
                success: function (data) {
                    if (data.Status === "0") {
                        if (data.DataStatus == 0) {
                            window.location.href = data.Datas.ReturnUrl;
                        } else {
                            ShowTips(data.Datas.Message, ".code-box");
                        }
                    } else {
                        ShowTips(data.ErrMsg, ".code-box");
                    }
                }
            });*/
        }finally {
            //发送 ajax 延迟绑定
            window.setTimeout(function () {
                //增加绑定
                $("#login_bd").on("click",createByPhone);
            },1000);
        };
    }

    // 绑定账号密码（手机账号密码、邮箱账号密码）
    function createByPwd(p) {
        HideTips();
        if (p == "account") {
            if (!Check_Account("UserName", ".account-box")) return false;    // 花礼账号
            if (!Check_Password("PassWord", ".pwd-box2")) return false;      // 账号密码
            var account = $("#UserName").val().trim();
            var pwd = $("#PassWord").val().trim();
        } else if (p == "email") {
            if (!Check_Email("email", ".mail-box")) return false;    // 邮箱账号
            if (!Check_Password("emailPassWord", ".pwd-box1")) return false;      // 账号密码
            var account = $("#email").val().trim();
            var pwd = $("#emailPassWord").val().trim();
        }
        $.ajax({
            type: "post",
            url: "/Passport/Login/ValidPasswordAndCreateMember",
            data: {
                account: account,
                password: pwd,
                appAuthorizedType: AuthType
            },
            async: false,
            success: function (res) {
                if (res.Status === '0') {
                    if (res.DataStatus === 0) {
                        window.location.href = res.Datas.ReturnUrl;
                    } else {
                        ShowTips(res.Datas.Message, ".pwd-box1");
                    }
                } else {
                    ShowTips(res.ErrMsg, ".pwd-box1");
                }
            }
        });
    }


</script>

<script type="text/javascript">
    var userId = 0;

    function reqUrlParam(paras) {
        var url = location.href;
        var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
        var paraObj = {}
        for (i = 0; j = paraString[i]; i++) {
            paraObj[j.substring(0, j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=") + 1, j.length);
        }
        var returnValue = paraObj[paras.toLowerCase()];
        if (typeof (returnValue) == "undefined") {
            return "";
        } else {
            return returnValue;
        }
    }

    function setLocalStoreHua(k, v) {
        try {
            if (localStorage != null) {
                localStorage.setItem(k, v);
            }
        } catch (ex) {
        }
    }

    function getLocalStoreHua(k) {
        try {
            if (localStorage != null) {
                var v1 = localStorage.getItem(k);
                localStorage.removeItem(k);
                return v1;
            }
        } catch (ex) {
        }
        return "";
    }

    var lsPerfKey = "home/GetProductListPrice";

    function getProductPrice() {
        var dataPps = "";
        $("span[data-pp]").each(function (index, data) {
            dataPps = dataPps + $(this).attr("data-pp") + ",";
        })
        if (dataPps.length > 0) {
            var perf1 = getLocalStoreHua(lsPerfKey);
            var dts = new Date();
            $.ajax({
                type: "POST", url: "/home/GetProductListPrice",
                data: {itemcodes: dataPps, perf: perf1},
                timeout: 60000, dataType: 'json',
                success: function (res) {
                    if (res.DataStatus == 200 && res.Status == '0') {
                        if (res.Datas.ProductPrices.length == 0) {
                            return false;
                        }
                        for (var i = 0, len = res.Datas.ProductPrices.length; i < len; i++) {
                            var temp = res.Datas.ProductPrices[i];
                            $("span[data-pp='" + temp.ItemCode + "']").text(temp.Price);
                        }
                    } else {
                    }
                },
                complete: function (res) {
                    var dte = new Date();
                    var useMs = dte.getTime() - dts.getTime();
                    //var resTxt = "v0,"+res.readyState + "," + res.status + "," + res.statusText;
                    var resTxt = "v0," + res.status + "," + dts.getTime() + "," + useMs;
                    setLocalStoreHua(lsPerfKey, resTxt);
                    //console.log("AjaxReq性能", resTxt);
                }
            });
        }
    }

    function setCurUrlClass() {
        // css : class = "color_tj"
        var pathname1 = window.location.pathname;
        $("a[href='" + pathname1 + "'").addClass("color_tj");
    }

    getProductPrice();

    function addHuaPid() {
        try {
            var path = encodeURIComponent(window.location.pathname);
            $("a[data-link]").each(function (index, data) {
                if ($(this).attr("href").indexOf("huaPid=") == -1) {
                    var href = $(this).attr("href") + "?huaPid=" + path + "-" + $(this).attr("data-link");
                    $(this).attr("href", href);
                }
            })
        } catch (e) {
            console.log(e);
        }
    }

    addHuaPid();

    $(function () {
        $(".menu-dropdown").hover(function () {
            $(this).addClass("open");
        }, function () {
            $(this).removeClass("open")
        })

        $("#header-chat,#kefu,#kefu1").click(function (e) {
            e.preventDefault();
            //$("#MEIQIA-BTN").click();
            //_MEIQIA('showPanel');
            openChatWindow();
        });

        if ($("#pjCount").length > 0) {
            $.get("/productpj/GetPJCount", function (data) {
                $("#pjCount").text(data);
            });
        }
    });
</script>
<!--Hua.com统计-->
<script type="text/javascript">
    function getParameters(paramName) {
        var returnValue = "";
        var kv = location.search.slice(1).split("&");
        for (var i = 0; i < kv.length; i++) {
            var index = kv[i].indexOf("=");
            if (index == -1) {
                continue;
            }
            var groupParam = kv[i].split("=")
            if (groupParam[0] == paramName) {
                if (returnValue.length > 0) {
                    returnValue = returnValue + "|" + groupParam[1];
                } else {
                    returnValue = groupParam[1];
                }
            }
        }
        return returnValue;
    }
</script>
<script type="text/javascript">

    $('#bindModal').on('hidden.bs.modal', function () {
        $("#attBindPage").attr("src", "");
    });
    //绑定窗口操作结束
    var appAuthorizedType = 2;
    if (appAuthorizedType && appAuthorizedType > 0) {
        DoBind();
    }

    function DoBind() {
        try {
            $('#consigneeModal').modal('hide');
            $('#loginModal').modal('hide');
            $('#bindModal').modal('show');
            $("#attBindPage").attr('src', '/Passport/Login/WinLoginBind?appAuthorizedType=' + appAuthorizedType)
        } catch (err) {
        }
    }

</script>
<span id="_calculateTextWidth"
      style="visibility: hidden; font-size: 16px; display: inline-block; position: absolute; left: -100%; top: -100%;">咨询客服</span>
</body>
</html>